import os
import sys
class User:
	def __init__(self,name):
		self.__name=name
		self.__EmailList=[]
		self.__TelefonoList=[]
	def setName(self,n):
		self.__name=n
		
	def getName(self):
		return self.__name
		
	def setDni(self,dni):
		self.__dni=dni
	def getDni(self):
		return self.__dni
		
	def addMail(self,o):
		self.__EmailList.append(o)
		
	def addTel(self,o):
		self.__TelefonoL.append(o)
	
	def getTelList(self):
		return self.__TelefonoList
		
	def getMailList(self):
		return self.__EmailList
		
class Email:
	def __init__(self,mail,tipo):
		self.__email=mail
		self.__tipo=tipo
	def setEmail(self,m):
		self.__email=m
	
	def getEmail(self):
		return self.__email
	
class Telefono:
	def __init__(self,num):
		self.__num=num
	
	def setNumero(self,n):
		self.__num=n
		
	def getNumero(self):
		return self.__num
		
userList=[]
o=0
print "1)Nuevo usuario\n2)Consultar usuario\n3)Salir\n0)Mostrar menu"
while o!=3:
	o=0
	o=input()
	if o==1:
		os.system("clear")
		user=raw_input("Nombre: ")
		u=User(user)
		m=raw_input("Email: ")
		t=raw_input("Tipo: ")
		mail=Email(m,t)
		u.addMail(mail)
		userList.append(u)
	elif o==2:
		os.system("clear")
		user=raw_input("Usuario a consultar: ")
		for i in range(0,len(userList)):
			if userList[i].getName()==user:
				print "Email: " + userList[i].getMailList()[0].getEmail()
	elif o==0:
		os.system("clear")
		print "1)Nuevo usuario\n2)Consultar usuario\n3)Salir\n0)Mostrar menu"
